#ifndef _SQLIST_H_
#define _SQLIST_H_
#include "declare.h"
#include <stdio.h>
#include <stdlib.h>

#define ELEMTYPE int
#define POSITION int
#define SIZE_T   int

struct SQList {
    ELEMTYPE * elements;
    SIZE_T length;
    SIZE_T maxNum;
};

typedef struct SQList * SeqList;

SeqList createSeqList(SIZE_T length);
void destroySeqList(SeqList list);
void printSeqList(SeqList list);
SIZE_T lengthSeqList(SeqList list);
int getVertexSeqList(SeqList list, POSITION p, ELEMTYPE *x);
POSITION locateVertexSeqList(SeqList list, ELEMTYPE x);
int insertPreSeqList(SeqList list, POSITION p, ELEMTYPE x);
int insertPostSeqList(SeqList list, POSITION p, ELEMTYPE x);
int deleteElemSeqList(SeqList list, ELEMTYPE x);
int deleteVertexSeqList(SeqList list, POSITION p);
int appendElemSeqList(SeqList list, ELEMTYPE x);

#endif
